<template>
  <div class="flex-center">
    <svg
      t="1638460431054"
      class="icon"
      viewBox="0 0 1024 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      p-id="3531"
      :width="size"
      :height="size"
      v-if="type2icon(1, item.type)"
      fill="#FFD07F"
    >
      <path
        d="M509.3376 102.272 306.9696 307.8144 591.4112 471.7568 802.56 266.5472Z"
        p-id="3532"
      ></path>
      <path
        d="M306.9696 339.6096 561.4592 486.8352 602.3936 907.3408 499.6096 907.3408Z"
        p-id="3533"
      ></path>
      <path
        d="M802.56 287.0016 602.3936 491.3152 631.5008 907.3408 770.8416 792.3968Z"
        p-id="3534"
      ></path>
      <path
        d="M102.7584 481.2544 57.9584 646.8608 253.184 648.704 302.592 480.7424Z"
        p-id="3535"
      ></path>
      <path
        d="M67.2512 663.296 242.0736 665.2416 444.0576 916.8384 396.0064 921.7536Z"
        p-id="3536"
      ></path>
      <path
        d="M308.608 491.3408 264.576 655.5904 459.1104 908.3392 466.048 858.5984Z"
        p-id="3537"
      ></path>
      <path
        d="M929.3568 487.2192 817.408 521.2928 887.04 634.8032 1002.0608 602.5472Z"
        p-id="3538"
      ></path>
      <path
        d="M811.2384 532.608 873.4464 634.3424 801.152 842.24 780.9536 816.256Z"
        p-id="3539"
      ></path>
      <path
        d="M998.0416 609.8432 887.1424 643.8912 811.4944 847.8976 842.8032 833.8944Z"
        p-id="3540"
      ></path>
    </svg>

    <svg
      t="1638460962625"
      class="icon"
      viewBox="0 0 1024 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      p-id="6347"
      :width="size"
      :height="size"
      v-if="type2icon(2, item.type)"
    >
      <path
        d="M441.989 582.189c-36.743-36.743-96.529-36.743-133.272 0s-36.743 96.529 0 133.272 96.529 36.743 133.272 0 36.743-96.529 0-133.272z m-91.186 91.186c-13.535-13.535-13.535-35.565 0-49.1 13.535-13.535 35.565-13.535 49.1 0 13.535 13.535 13.535 35.565 0 49.1-13.535 13.535-35.564 13.535-49.1 0z"
        p-id="6348"
        fill="#125C13"
      ></path>
      <path
        d="M501.611 220.951L228.053 494.51l0.178 0.178c-1.205 1.15-2.502 2.146-3.685 3.329-83.155 83.155-83.158 218.458 0 301.616s218.461 83.155 301.616 0c2.373-2.373 4.437-4.93 6.675-7.388L802.87 522.211c79.639-83.413 78.646-215.956-3.329-297.93s-214.517-82.968-297.93-3.33z m42.086 42.086c52.88-49.588 132.451-54.8 190.854-15.496L590.566 391.526l42.086 42.086L776.584 289.68c6.899 10.325 12.256 21.346 16.381 32.72L564.67 550.694a212.417 212.417 0 0 0-38.509-52.677 212.392 212.392 0 0 0-52.677-38.509l161.399-161.399-42.086-42.086-182.663 182.663c-12.998-2.134-26.126-3.096-39.263-2.823l172.826-172.826z m-277.066 494.51c-59.951-59.951-59.951-157.493 0-217.444s157.493-59.951 217.444 0c57.577 57.577 59.694 149.736 6.673 210.059l-3.522 3.522 0.178 0.178c-1.137 1.212-2.146 2.502-3.329 3.685-59.95 59.95-157.493 59.95-217.444 0zM588.35 652.56c0.224-12.89-0.766-25.764-2.858-38.515L800.326 399.21c-4.678 29.41-17.803 57.735-39.541 80.915L588.35 652.56z"
        p-id="6349"
        fill="#125C13"
      ></path>
    </svg>

    <svg
      t="1638461225721"
      class="icon"
      viewBox="0 0 1024 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      p-id="10027"
      :width="size"
      :height="size"
      v-if="type2icon(3, item.type)"
    >
      <path
        d="M728.32 62.0032a38.2976 38.2976 0 0 0-51.2512 17.9712 38.4 38.4 0 0 0 17.9712 51.2512A424.8576 424.8576 0 0 1 934.4 512c0 232.9088-189.4912 422.4-422.4 422.4S89.6 744.9088 89.6 512 279.0912 89.6 512 89.6a38.4 38.4 0 0 0 0-76.8C236.7488 12.8 12.8 236.7488 12.8 512s223.9488 499.2 499.2 499.2 499.2-223.9488 499.2-499.2a502.1184 502.1184 0 0 0-282.88-449.9968z"
        fill="#438CFF"
        p-id="10028"
      ></path>
      <path
        d="M512 371.8656a38.4512 38.4512 0 0 0-29.0816 13.3632c-25.5488 29.6448-152.832 182.1184-152.832 271.104 0 100.352 81.6128 181.9648 181.9648 181.9648s181.9136-81.6128 181.9136-181.9648c0-88.9856-127.2832-241.4592-152.832-271.104A38.656 38.656 0 0 0 512 371.8656z m0 389.632a105.2672 105.2672 0 0 1-105.1648-105.1648c0-37.3248 54.6304-121.088 105.1648-185.4464 50.4832 64.3584 105.1136 148.1216 105.1136 185.4464A105.2672 105.2672 0 0 1 512 761.4976z"
        fill="#438CFF"
        p-id="10029"
      ></path>
      <path
        d="M512 275.3024m-51.2 0a51.2 51.2 0 1 0 102.4 0 51.2 51.2 0 1 0-102.4 0Z"
        fill="#438CFF"
        p-id="10030"
      ></path>
    </svg>

    <svg
      t="1638461300205"
      class="icon"
      viewBox="0 0 1024 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      p-id="11668"
      :width="size"
      :height="size"
      v-if="type2icon(4, item.type)"
    >
      <path
        d="M336 972.8c-60.8-128-28.8-201.6 19.2-268.8 51.2-76.8 64-150.4 64-150.4s41.6 51.2 25.6 134.4c70.4-80 83.2-208 73.6-256 160 112 230.4 358.4 137.6 537.6 492.8-281.6 121.6-700.8 57.6-745.6 22.4 48 25.6 128-19.2 166.4-73.6-281.6-256-336-256-336 22.4 144-76.8 300.8-172.8 419.2-3.2-57.6-6.4-96-38.4-153.6-6.4 105.6-86.4 188.8-108.8 294.4C89.6 758.4 140.8 860.8 336 972.8L336 972.8z"
        p-id="11669"
        fill="#CD1818"
      ></path>
    </svg>

    <svg
      t="1638461544269"
      class="icon"
      viewBox="0 0 1365 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      p-id="31025"
      :width="size"
      :height="size"
      v-if="type2icon(5, item.type)"
    >
      <path
        d="M524.666667 628.533333h89.466666l116-203.466666h177.466667l116.933333 203.466666h89.6l108.933334 190.933334H1322.666667L1115.066667 433.866667h-131.2L809.066667 126.133333H557.6L382.8 433.866667h-131.2L44 819.466667h370.8z"
        p-id="31026"
        fill="#B68973"
      ></path>
      <path
        d="M1096.4 659.066667h-84.266667L900 457.2H738.666667l-112.133334 201.866667h-84.133333l-133.2 238.133333h820.4z"
        p-id="31027"
        fill="#B68973"
      ></path>
    </svg>
  </div>
</template>

<script>
export default {
  name: "workplace-icon",
  props: {
    item: Object,
    size: Number,
  },
  methods: {
    type2icon(id, type) {
      if (id == type) {
        return true;
      } else {
        return false;
      }
    },
  },
};
</script>

<style>
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>